package com.zhima.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhima.dto.QuestionBankDTO;
import com.zhima.entity.OjQuestionBank;
import com.zhima.vo.MineQuestionBankVO;
import com.zhima.vo.QuestionBankEditVO;
import com.zhima.vo.QuestionBankShowVO;
import com.zhima.vo.QuestionBankTableVO;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhima
 * @since 2023-08-25
 */
public interface OjQuestionBankService extends IService<OjQuestionBank> {

    String createNewQuestionBank(Long userId, QuestionBankDTO questionBankDTO);

    Page<QuestionBankTableVO> pageQueryQuestionBankBasicInfo(Long userId, Long pageNum, Long pageSize, String keyword);

    boolean deleteQuestionBankById(Long userId, Long questionBankId);

    boolean updateQuestionBankBasicInfo(Long userId, QuestionBankDTO questionBankDTO);

    QuestionBankShowVO queryQuestionBankDetailById(Long userId, Long questionBankId);

    Page<MineQuestionBankVO> pageQueryMineQuestionBank(Long userId, Long pageNum, Long pageSize);

    QuestionBankEditVO queryQuestionBankEditById(Long userId, Long questionBankId);

    boolean updateQuestionNum(Long questionBankId, boolean increase);

}
